-
Notifications
You must be signed in to change notification settings - Fork 99
Integrated Redis Cache and Redis Sessions into Redis OM Spring. #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
👀 |
try { | ||
jsonValues = connection.sync().jsonGet(key); | ||
} catch (NullPointerException e) { | ||
// Workaround for Lettuce 6.5 bug: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldn't need this anymore rihgt since we are using Lettuce 6.7.1.RELEASE?
this.evictionLatency = Timer.builder("cache.evictions.latency").tag("name", name).description("Cache evictions") | ||
.register(configuration.getMeterRegistry()); | ||
if (configuration.isIndexEnabled()) { | ||
createIndex(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to recreate the index every time RedisCache
is instantiated? If this is running in multiple apps that come up and down in k8s pods for example it seems like it would be recreated a lot. Maybe check if its already created and in sync before dropping it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jruaux looking at the code the creation of the index seems to impact only one field, which is the _class
field of the JSON/Hash.
If that is the case, it would be easy to implement a check to verify if the index really needs to be recreated or not.
Waiting for your feedback to proceed, once you are back!
throw new IllegalArgumentException(String.format("unparseable point %s", s)); | ||
} | ||
|
||
return new GeoLoc(Double.parseDouble(parts[1]), Double.parseDouble(parts[1])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a bug? Should it be parts[0]
and parts[1]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeremyplichta You are right!
How did you catch that? 😳
Bringing Redis Cache and Redis Sessions into Redis OM Spring.
To keep a standard and "all-in-one" naming convention:
com.redis.cache
tocom.redis.om.cache
com.redis.sessions
tocom.redis.om.sessions